---
id: "send-pipe-decorator"
keywords: ["send", "pipe", "decorator"]
name: "@bs.send.pipe"
summary: "This is the `@bs.send.pipe` decorator."
category: "decorators"
status: "deprecated"
---

> Removed since compiler version 10.0. Use the [@send](../docs/manual/bind-to-js-function.mdx) decorator instead.

The `@bs.send.pipe` decorator is used to bind to a method on an object or array.

### Example

<CodeTab labels={["ReScript", "JS Output"]}>

```res
// Bind to a method on an object
type document
@bs.send.pipe(: document)
external getElementById: string => Dom.element = "getElementById"
@val external doc: document = "document"
let el = getElementById("myId", doc)

// Bind to a method on an array
@bs.send.pipe(: array<'a>)
external fillInPlace: 'a => array<'a> = "fill"
let a = fillInPlace(99, [1, 2, 3])
```

```js
var el = document.getElementById("myId");

var a = [1, 2, 3].fill(99);
```

</CodeTab>

### References

- [Bind to JS function](../docs/manual/bind-to-js-function.mdx)
